import dayjs from 'dayjs'

export const commentsColumn = [
    {
        label: '文章',
        prop: 'articleId',
        editDisplay: false,
    },
    {
        label: '内容',
        prop: 'content',
        type: 'textarea',
        search: true,
    },
    {
        label: '用户',
        prop: 'userId',
        editDisplay: false,
        formatter: (row) => {
            return row.user.nickname
        },
    },
    {
        label: '父评论id',
        prop: 'parentId',
        editDisplay: false,
        // display: false,
    },
    {
        label: '发布时间',
        prop: 'publishTime',
        type: 'datetime',
        formatter: (_row, val) => {
            return val ? dayjs(val).format('YYYY-MM-DD HH:mm:ss') : ''
        },
        row: true,
        editDisplay: false,
    },
]
